package com.zlx.mall.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.Instant;

/**
 * <p>
 * Quartz 作业
 * </p>
 *
 * @author taotao
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("`sc_quartz_job`")
public class ScQuartzJob implements Serializable {

    private static final long serialVersionUID = 1L;

    /** PK,AI */
    @TableId(value = "`id`", type = IdType.AUTO)
    private Long id;
    /** 状态 {0-disable(default) 1-enable} */
    @TableField("`status`")
    private Boolean status;
    /** Job Group */
    @TableField("`job_group`")
    private String jobGroup;
    /** Job Name */
    @TableField("`job_name`")
    private String jobName;
    /** Job 描述 */
    @TableField("`job_description`")
    private String jobDescription;
    /** Job类名, e.g. com.example.Test */
    @TableField("`job_class_name`")
    private String jobClassName;
    /** 作业数据，json格式 */
    @TableField("`job_data`")
    private String jobData;
    /** Job Cron 表达式 */
    @TableField("`cron_expression`")
    private String cronExpression;
    /** 执行器ip地址 */
    @TableField("`executors`")
    private String executors;
    /** 版本号 */
    @TableField("`version`")
    private Integer version;
    /** 删除状态： {0-exist !0-deleted} */
    @TableField("`is_delete`")
    private Long isDelete;
    /** 创建时间 */
    @TableField("`create_timestamp`")
    private Instant createTimestamp;
    /** 修改时间 */
    @TableField("`modify_timestamp`")
    private Instant modifyTimestamp;

    /** PK,AI */
    public static final String ID = "id";
    /** 状态 {0-disable(default) 1-enable} */
    public static final String STATUS = "status";
    /** Job Group */
    public static final String JOB_GROUP = "job_group";
    /** Job Name */
    public static final String JOB_NAME = "job_name";
    /** Job 描述 */
    public static final String JOB_DESCRIPTION = "job_description";
    /** Job类名, e.g. com.example.Test */
    public static final String JOB_CLASS_NAME = "job_class_name";
    /** 作业数据，json格式 */
    public static final String JOB_DATA = "job_data";
    /** Job Cron 表达式 */
    public static final String CRON_EXPRESSION = "cron_expression";
    /** 执行器ip地址 */
    public static final String EXECUTORS = "executors";
    /** 版本号 */
    public static final String VERSION = "version";
    /** 删除状态： {0-exist !0-deleted} */
    public static final String IS_DELETE = "is_delete";
    /** 创建时间 */
    public static final String CREATE_TIMESTAMP = "create_timestamp";
    /** 修改时间 */
    public static final String MODIFY_TIMESTAMP = "modify_timestamp";
}
